using System.ComponentModel.DataAnnotations;
using FytSoa.Domain.Sys;
using SqlSugar;

namespace FytSoa.Domain.Erp;

/// <summary>
/// erp-供应商
/// </summary>
[SugarTable("erp_supplier")]
public class ErpSupplier:Entity
{
    /// <summary>
    /// 供应商名称
    /// </summary>
    [Required]
    [StringLength(100)]
    public string Name { get; set; }

    /// <summary>
    /// 级别编号
    /// </summary>
    [Required]
    public long LevelId { get; set; }
    
    /// <summary>
    /// 级别
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(LevelId))]
    public SysCode Level { get; set; }

    /// <summary>
    /// 联系人
    /// </summary>
    public string ContactUser { get; set; }

    /// <summary>
    /// 联系电话
    /// </summary>
    public string Phone { get; set; }

    /// <summary>
    /// 区县
    /// </summary>
    public string County { get; set; }

    /// <summary>
    /// 详细地址
    /// </summary>
    public string Address { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新人
    /// </summary>
    public string UpdateUser { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }


}